from django.conf.urls import url

from users import views

urlpatterns = [
    # 首页
    url(r'^index/$', views.IndexView.as_view(), name="index"),
    # 注册
    url(r'^register/$', views.RegisterView.as_view(), name='register'),
    # 登录
    url(r'^login/$', views.LoginView.as_view(), name='login'),
    # 退出
    url(r'^logout/$', views.LogoutView.as_view(), name='logout'),
    # 忘记密码
    url(r'^forget/$', views.ForgetPwdView.as_view(), name='forget_pwd'),
    # 用户中心
    url(r'^users/info/$', views.UserInfoView.as_view(), name='user_info'),
    # 我的信息
    url(r'^users/mymessage/$', views.MyMessageView.as_view(), name='mymessage'),
    url(r'^users/mymessage/(?P<page_id>\d+)/$', views.MyMessagePageView.as_view(), name='mymessagepage'),
    # 我的课程
    url(r'^users/mycourse/$', views.MyCourseView.as_view(), name='mycourse'),
    # 我的收藏
    url(r'^users/myfav/org/$', views.MyFavOrgView.as_view(), name='myfav_org'),
    # 修改图片
    url(r'^users/image/upload/$', views.UploadImageView.as_view(), name='image_upload'),
    # 授课教师
    url(r'^users/myfav/teacher/$', views.Myfavteacher.as_view(), name='myfav_teacher'),
    # 公开课程
    url(r'^users/myfav/course/$', views.Myfavcourse.as_view(), name='myfav_course'),
    # 邮箱发送验证路由,修改密码
    url(r'^reset/(?P<active_code>.*)/$', views.ResetView.as_view(), name='reset_pwd'),
    # 修改密码页面
    url(r'modifypwd/$', views.Modifypwd.as_view(), name='modify_pwd'),
]
